<%--
  Created by IntelliJ IDEA.
  User: Eternity
  Date: 2020/9/28
  Time: 11:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.js"></script>
</head>
<script>

    $(function () {
        //先都隐藏掉
        $(".guanliyuan").hide();
        $(".putong").hide();

        //如果type==0   guanliyuan显示
        //如果type==1   jiaoshi显示
        var type = $("#type").val();
        if (type==0){
            $(".guanliyuan").show();
        }else if(type == 1){
            $(".putong").show();
        }

    })

</script>

<style>
    .nav-link guanliyuan:active{
        color: #e9ecef;
    }
</style>
<body>
<%--账号的类型user.type--%>
<input type="text" value="${user.type}" id="type">
<nav class="navbar navbar-expand-sm bg-dark navbar-dark fixed-top">
    <a class="active navbar-brand" href="/user/home">勾正教育</a>
    <ul class="navbar-nav">
        <li class="nav-item">
            <a class="nav-link guanliyuan" href="/user/getAll">账号管理</a>
        </li>
        <li class="nav-item">
            <a class="nav-link guanliyuan" href="/paper/pages">考题管理</a>
        </li>
        <li class="nav-item">
            <a class="nav-link guanliyuan" href="/student/findStudent?superior=${user.id}">学生管理</a>
        </li>
        <li class="nav-item">
            <a class="nav-link guanliyuan" href="/remarks/findAllRemarks">留言</a>
        </li>
        <%--<button type="button" class="btn btn-danger" style="margin-left: 1010px;height:35px"></button>--%>
        <li class="nav-item">
            <a class="nav-link guanliyuan" href="/user/loginOut" style="color:#e9ecef;margin-left: 1020px">切换账号</a>
        </li>
        <li class="nav-item">
            <a class="nav-link putong" href="/paper/upLinex">答题</a>
        </li>
        <li class="nav-item">
            <a class="nav-link putong" href="#">答题记录</a>
        </li>
        <li class="nav-item">
            <a class="nav-link putong" href="/remarks/getStuNum?stuNum=${student.stuNum}">留言</a>
        </li>

    </ul>
</nav>
<br>
<br>
<br>

</body>
</html>
